﻿using System;
using System.Collections.Generic;
using System.Text;
using XISoft.AppCreator.Util.CompileHelper;
using XISoft.AppCreator.TplEngine.ITpl;

namespace XISoft.AppCreator.TplEngine.XITpl
{
    public class XIProperty : IBaseProperty
    {
        private String _name, _displayName;
        private IBaseType _type, _accessType;
        private Boolean _isNullAble;
        private long _length;

        #region IBaseProperty 成员

        public string Name
        {
            get { return _name; }
            set
            {
                _name = CompileCommon.LowFirst(value.Trim());
                _displayName = CompileCommon.UpFirst(value.Trim());
            }
        }

        public IBaseType Type
        {
            get { return _type; }
            set { _type = value; }
        }

        public IBaseType AccessType
        {
            get { return _accessType; }
            set { _accessType = value; }
        }

        public string DisplayName
        {
            get { return _displayName; }
            set { _displayName = value; }
        }

        public Boolean IsNullAble
        {
            get { return _isNullAble; }
            set { _isNullAble = value; }
        }

        public long Length
        {
            get { return _length; } 
            set { _length = value; }
        }
        #endregion
    }
}
